package com.glodon.paas.storage;

import java.io.InputStream;

/**
 * class for carrying information of an input stream response
 * @author guojf
 *
 */
public class ReadResult {
	private InputStream inputStream;
	private long length = -1;
	private long[] ranges = new long[] {};
	private String name;
	
	public ReadResult(InputStream inputStream){
		this.inputStream = inputStream;
	}
	
	public ReadResult(InputStream inputStream, long length) {
		this.inputStream = inputStream;
		this.length = length;
	}
	
	public InputStream getInputStream() {
		return inputStream;
	}
	
	public void setInputStream(InputStream inputStream) {
		this.inputStream = inputStream;
	}
	
	public long getLength() {
		return length;
	}
	
	public void setLength(long length) {
		this.length = length;
	}
	
	public long[] getRanges() {
		return ranges;
	}
	
	public void setRanges(long[] ranges) {
		this.ranges = ranges;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
}
